<?php
include_once '/includes/magicquotes.inc.php';
include_once '/includes/helpers.inc.php';
require_once '/includes/access.inc.php';

session_start();

if (!userIsLoggedIn())
{
	include 'login.html.php';

	$_SESSION['which'] = 'student';
	$_SESSION['whichS'] = 'view';
	$_SESSION['view_type'] = 'all';
	$_SESSION['index'] = 0;
	exit();
}

if(isset($_SESSION['who']) and $_SESSION['who'] == 'student')
{
	include '/includes/db.inc.php';
	include '/student/almost_events_hereS.php';
	include '/student/prepare_page_countS.php';
	include '/student/prepare_boardS.php';
	include '/student/student_panel.html.php';
	exit();
}
else
if(isset($_SESSION['who']) and $_SESSION['who'] == 'admin')
{
	include '/includes/db.inc.php';
	include '/admin/almost_events_here.php';
	include '/admin/prepare_page_count.php';
	include '/admin/prepare_board.php';
	include '/admin/admin_panel.html.php'; // contains 'get_form.php' and 'get_board.php'
	exit();
}

exit();
?>